/**
 * 存储流程设计相关参数
 */
 export default class BpmData {
    constructor () {
      this.controls = [] // 设计器控件
      this.init()
    }
  
    init () {
      this.controls = [
        {
          action: 'create.start-event',
          title: '圆形',
        },
        {
          action: 'create.intermediate-event',
          title: '空心圆'
        },
        {
          action: 'create.end-event',
          title: '圆圈',
        },
        {
          action: 'create.task',
          title: '长方形',
        },
        {
          action: 'create.data-object',
          title: '数据'
        },
        {
          action: 'create.data-store',
          title: '圆柱'
        }
      ]
    }
  
    //  获取控件配置信息
    getControl (action) {
      const result = this.controls.filter(item => item.action === action)
      return result[0] || {}
    }
  }
  